package view;

import model.KlsVehiculo;

import com.opensymphony.xwork2.ActionSupport;

import controller.KlsVehiculoManager;

public class ZonaAction extends ActionSupport{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private int idVehiculo;
	private String zona;
	private String pesoMax;
	private String volumenMax;
	private String patenteVehiculo;
	
	
	public String zonaPorVehiculo() {
		
		KlsVehiculoManager vehiculoManager = new KlsVehiculoManager();
		setZona(vehiculoManager.getZonaDelVEhiculo(this.idVehiculo));
		
		KlsVehiculo vehiculo = vehiculoManager.load(idVehiculo);
		setPesoMax(vehiculo.calcularPesoMax().toString());
		setVolumenMax(vehiculo.calcularVolumenMax().toString());
		patenteVehiculo = vehiculo.getPatente();
	return SUCCESS;
	}
	
	



	public String getZona() {
		return zona;
	}



	public void setZona(String zona) {
		this.zona = zona;
	}



	public String getPesoMax() {
		return pesoMax;
	}



	public void setPesoMax(String pesoMax) {
		this.pesoMax = pesoMax;
	}



	public String getVolumenMax() {
		return volumenMax;
	}



	public void setVolumenMax(String volumenMax) {
		this.volumenMax = volumenMax;
	}
	
	
	public int getIdVehiculo() {
		return idVehiculo;
	}



	public void setIdVehiculo(int idVehiculo) {
		this.idVehiculo = idVehiculo;
	}





	public String getPatenteVehiculo() {
		return patenteVehiculo;
	}





	public void setPatenteVehiculo(String patenteVehiculo) {
		this.patenteVehiculo = patenteVehiculo;
	}

}
